from rest_framework import serializers

from apps.goods.models import SKUImage, SKU


class ImageSerializer(serializers.ModelSerializer):
    class Meta:
        model = SKUImage
        fields = '__all__'


# 获取sku列表的序列化器
class SKUSerializer(serializers.ModelSerializer):
    class Meta:
        model = SKU
        fields = ['id', 'name']

